/*****************************************************************************
 * Copyright (C) Stacy Curl. All rights reserved.                            *
 * ------------------------------------------------------------------------- *
 * The software in this package is published under the terms of the BSD      *
 * style license a copy of which has been included with this distribution in *
 * the LICENSE.txt file.                                                     *
 *****************************************************************************/
package picounit.features.registry;

import picounit.features.Feature;
import picounit.features.base.FeatureRegistry;
import picounit.features.classloader.ClassReloader;

public class RegistryFeature implements Feature {
	private final ClassReloader classReloader;

	public RegistryFeature(ClassReloader classReloader) {
		this.classReloader = classReloader;
	}

	public void addFeatures(FeatureRegistry featureRegistry) {
		RegistryImpl registry = new RegistryImpl(classReloader);
//		registry.register(ClassLoader.class, classLoader);
//		registry.register(ClassReloader.class, classReloader);

		featureRegistry.addFeatures(registry, new DefaultRegistryFactory(registry, classReloader));
	}
}
